<template>
  <div class="author">
    <nav-bar text="浅月于静"></nav-bar>
    <div class="content">
      <better-scroll>
        <banner url="https://cdn.pixabay.com/photo/2015/04/19/08/32/marguerite-729510_960_720.jpg">
          <div class="author-info">
            <div class="author-avatar">
              <img src="https://cdn.pixabay.com/photo/2013/07/13/10/07/man-156584_960_720.png" alt="">
            </div>
            <div class="btn">
              <svg-icon name="add" color="#fff"></svg-icon>
              <span>关注</span>
            </div>
          </div>
        </banner>
        <h2 class="list-title">历史消息</h2>
        <ul class="histroy-list">
          <li class="history-item" v-for="(item, idx) in 20" :key="idx">
            <div class="preview">
              <img src="https://cdn.pixabay.com/photo/2014/08/25/14/12/pansy-427139_960_720.png" alt="">
            </div>
            <div class="infomation">
              <section class="summary">第一次自己种肉肉，迫不及待的种上了，希望肉肉第一次自己种肉肉，迫不及待的种上了，希望肉肉一切都好。不得不说真的太喜欢了，长长应该会更漂亮。</section>
              <p>2018年12月17日</p>
            </div>
          </li>
        </ul>
      </better-scroll>
    </div>
  </div>
</template>

<script>
import BetterScroll from '@/components/BetterScroll.vue'
import Banner from '@/components/Banner.vue'
import NavBar from '@/components/NavBar.vue'

export default {
  components: {
    BetterScroll,
    Banner,
    NavBar
  }
}
</script>

<style scoped>
.author {
  width: 100%;
  height: 100%;
  background-color: #E9E9E9;
}
.content {
  height: calc(100% - 96px);
  width: 100%;
}
.author-info {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.author-avatar {
  width: 137px;
  height: 137px;
  border: 1px solid #999;
  border-radius: 50%;
  background-color: #fff;
  overflow: hidden;
  margin-bottom: 30px;
}
.author-avatar > img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.btn {
  font-size: 36px;
  color: #fff;
  display: flex;
  align-items: center;
}
.list-title {
  height: 60px;
  line-height: 60px;
  padding: 0 25px;
  font-size: 36px;
  color: #666;
  background-color: #fff;
}
.histroy-list {
  padding: 23px 14px;
}
.history-item {
  width: 100%;
  background-color: #fff;
  padding: 10px 14px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  margin-bottom: 17px;
}
.preview {
  width: 163px;
  height: 146px;
  background-color: #f2f2f2;
  margin-right: 8px;
  flex-shrink: 0;
}
.preview > img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.infomation {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.infomation > section {
  font-size: 26px;
  color: #666;
  line-height: 38px;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
}
.infomation > p {
  font-size: 20px;
  color: #999;
  margin-top: 24px;
}
</style>
